package com.yunbiao.ybbusstopplate.base

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import com.blankj.utilcode.util.FragmentUtils

abstract class BaseFragment :Fragment(),FragmentUtils.OnBackClickListener {
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(getViewId(), container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        initView()
        initData()
        initListener()
    }

    abstract fun getViewId():Int
    protected open fun initView(){}
    protected open fun initData(){}
    protected open fun initListener(){}

    override fun onBackClick(): Boolean {
        return false
    }
}